package com.lude.erp.prototype.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.lude.erp.common.model.BaseModel;

@Entity(name = "system_function_menu")
public class SystemFunctionMenu implements BaseModel
{

	private static final long serialVersionUID = 1L;

	private long menuId;

	private SystemFunction systemFunction;

	private String name;

	private String localName;

	private String url;

	private Integer sequence;

	private String description;

	private Date createdDate;

	private Date createdDatetime;

	private Date updatedDate;

	private Date updatedDatetime;

	private Set<IdentityRoleMenu> identityRoleMenus = new HashSet<IdentityRoleMenu>(0);

	@Id
	@GeneratedValue
	public long getMenuId()
	{
		return menuId;
	}

	public void setMenuId(long menuId)
	{
		this.menuId = menuId;
	}

	@ManyToOne
	@JoinColumn(name = "function_id")
	public SystemFunction getSystemFunction()
	{
		return systemFunction;
	}

	public void setSystemFunction(SystemFunction systemFunction)
	{
		this.systemFunction = systemFunction;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getLocalName()
	{
		return localName;
	}

	public void setLocalName(String localName)
	{
		this.localName = localName;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public Integer getSequence()
	{
		return sequence;
	}

	public void setSequence(Integer sequence)
	{
		this.sequence = sequence;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public Date getCreatedDate()
	{
		return createdDate;
	}

	public void setCreatedDate(Date createdDate)
	{
		this.createdDate = createdDate;
	}

	public Date getCreatedDatetime()
	{
		return createdDatetime;
	}

	public void setCreatedDatetime(Date createdDatetime)
	{
		this.createdDatetime = createdDatetime;
	}

	public Date getUpdatedDate()
	{
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate)
	{
		this.updatedDate = updatedDate;
	}

	public Date getUpdatedDatetime()
	{
		return updatedDatetime;
	}

	public void setUpdatedDatetime(Date updatedDatetime)
	{
		this.updatedDatetime = updatedDatetime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "systemFunctionMenu")
	public Set<IdentityRoleMenu> getIdentityRoleMenus()
	{
		return identityRoleMenus;
	}

	public void setIdentityRoleMenus(Set<IdentityRoleMenu> identityRoleMenus)
	{
		this.identityRoleMenus = identityRoleMenus;
	}

}
